<?php
define('MOD_ROOT', substr(dirname(__FILE__), 0, -4));

$module = 'pay';
//require substr(MOD_ROOT, 0, -strlen($module)).'/include/common.inc.php';
require_once MOD_ROOT.'pay/includes/pay.func.php';
require_once WWW_ROOT.'pay/includes/form.class.php';
$pay_code = 'chinabank';

$plugin_file = WWW_ROOT.'pay/includes/payment/'.$pay_code.'.php';
if (is_file($plugin_file))
{
	include_once( $plugin_file );
	$payment = new $pay_code();
	$result = $payment->respond();
	if ($result)
	{
		exit("ok");
	}
	else if($payment->err)
	{
		exit("error");
	}
	else
	{
		exit("error");
	}
}
else
{
	exit("error");
}
?>